#region Using directives
using System;
using System.IO;
using System.Windows.Forms;
#endregion

namespace SharpWind.Helpers
{
	public static class Directories
	{
		#region Paths

		public static string ApplicationStartup
		{
			get
			{
				return Application.StartupPath;
			}
		}

		public static string Content
		{
			get
			{
				string path = Path.Combine( ApplicationStartup, "Content" );
				CreateDirectory( path );

				return path;
			}
		}

		public static string Sounds
		{
			get
			{
				string path = Path.Combine( Content, "Sounds" );
				CreateDirectory( path );

				return path;
			}
		}

		public static string Shaders
		{
			get
			{
				string path = Path.Combine( Content, "Shaders" );
				CreateDirectory( path );

				return path;
			}
		}

		public static string Environments
		{
			get
			{
				string path = Path.Combine( Content, "Environments" );
				CreateDirectory( path );

				return path;
			}
		}

		public static string Log
		{
			get
			{
				string path =  Path.Combine( ApplicationStartup, "Log" );
				CreateDirectory( path );

				return path;
			}
		}

		public static string Scripts
		{
			get
			{
				string path = Path.Combine( Content, "Scripts" );
				CreateDirectory( path );

				return path;
			}
		}

		public static string Textures
		{
			get
			{
				string path = Path.Combine( Content, "Textures" );
				CreateDirectory( path );

				return path;
			}
		}

		public static string Meshes
		{
			get
			{
				string path = Path.Combine( Content, "Meshes" );
				CreateDirectory( path );

				return path;
			}
		}

		#endregion

		#region Methods

		private static void CreateDirectory( string path )
		{
			if( !Directory.Exists( path ) )
			{
				Directory.CreateDirectory( path );
			}
		}

		#endregion
	}
}
